{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
<!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form action="" method="">	
                <div class="box-header with-border">
                    <a href="index.php?a=informstyle.informstylelist" class="btn btn-default btn-sm ">标题设置</a>
                    <!--<a href="" class="btn btn-default ">正文设置</a>-->
                    <a href="index.php?a=informstyle.noticesetlist" class="btn btn-primary btn-sm ">审批设置</a>
                    <a href="index.php?a=informstyle.nooutdata" class="btn btn-success btn-sm" style="float:right;">导出</a>
                    <a href="index.php?a=informstyle.noticesetdels" class="btn btn-danger btn-sm" style="float:right; margin-left:8px; margin-right:8px;" onclick="if(confirm('警告！确认清空信息?')==false)return false;" title="一键清空">一键清空</a>
                    <a href="index.php?a=informstyle.noticesetadd" class="btn btn-warning btn-sm" style="float:right;">批量设置</a>
                </div>
                   <div class="box-body"> 
                     <p class="text-blue">无审批人代表无需审批</p>
                     <table class="table table-bordered table-striped"  id="mytable">
                              <thead>
                                    <tr style="background-color:#fcba4b;">
                                        <td width="260">发布人</td>
                                        <td>审批人</td>
										<td width="130">操作</td>
                                    </tr>	
                               </thead>
                                    <tr>
									    <td style="font-weight:bold;">部门</td>
                                        <td></td>
										<td></td>
                                    </tr>
									{%foreach from=$department_lists key=key item=value%}
                                    <tr>
									    <td>{%$value.department_name%}</td>
                                        <td>
										{%foreach from=$value.staff_name key=k item=v%}
										    {%$v%}
										{%/foreach%}
										</td>
										<td>
                                            <a href="#" class="btn btn-warning btn-sm" title="修改"  data-toggle="modal" data-target="#myModal" 
											onclick="show({%$value.department_id%})"> <i class="fa fa-edit (alias)"></i> </a>
                                            <a href="index.php?a=informstyle.noticesetdel&audit_type=department&type_id={%$value.department_id%}" class="btn btn-danger btn-sm" onclick="if(confirm('警告！确认清空信息?')==false)return false;" title="清空"> <i class="fa fa-trash-o"></i></a>
                                        </td>
                                    </tr>
									{%/foreach%}
                                    <tr>
									    <td style="font-weight:bold;">教学组</td>
                                        <td></td>
										<td></td>
                                    </tr>
                                   <tr>
									    <td>教研组</td>
                                        <td>
											{%foreach from=$research_lists key=key item=value%}
												 {%$value.staff_name%}
											{%/foreach%}
										</td>
										<td>
											<a href="#" class="btn btn-warning btn-sm" title="修改"  data-toggle="modal" data-target="#myModal" onclick="shows('research')"> <i class="fa fa-edit (alias)" ></i> </a>
                                           <a href="index.php?a=informstyle.noticesetdel&audit_type=research&type_id=1" class="btn btn-danger btn-sm" onclick="if(confirm('警告！确认清空信息?')==false)return false;" title="清空"> <i class="fa fa-trash-o"></i></a>
										</td>
                                   </tr>
								   <tr>
									    <td>备课组</td>
                                        <td>
											{%foreach from=$prepare_lists key=key item=value%}
												 {%$value.staff_name%}
											{%/foreach%}
										</td>
										<td>
											<a href="#" class="btn btn-warning btn-sm" title="修改"  data-toggle="modal" data-target="#myModal"onclick="shows('prepare')"> <i class="fa fa-edit (alias)"></i> </a>
                                            <a href="index.php?a=informstyle.noticesetdel&audit_type=prepare&type_id=1" class="btn btn-danger btn-sm" onclick="if(confirm('警告！确认清空信息?')==false)return false;" title="清空"> <i class="fa fa-trash-o"></i></a>
										</td>
                                   </tr>
								   <tr>
									    <td>学科组</td>
                                        <td>
											{%foreach from=$discipline_lists key=key item=value%}
												 {%$value.staff_name%}
											{%/foreach%}
										</td>
										<td>
											<a href="#" class="btn btn-warning btn-sm" title="修改"  data-toggle="modal" data-target="#myModal"onclick="shows('discipline')"> <i class="fa fa-edit (alias)"></i> </a>
                                            <a href="index.php?a=informstyle.noticesetdel&audit_type=discipline&type_id=1" class="btn btn-danger btn-sm" onclick="if(confirm('警告！确认清空信息?')==false)return false;" title="清空"> <i class="fa fa-trash-o"></i></a>
										</td>
                                   </tr>
                                   <tr>
									    <td style="font-weight:bold;">年级级长</td>
                                        <td></td>
										<td></td>
                                    </tr>
                                    {%foreach from=$grade_lists key=key item=value%}
                                    <tr>
									    <td>{%$value.grade_name%}级长</td>
                                        <td>
										{%foreach from=$value.staff_name key=k item=v%}
										    {%$v%}
										{%/foreach%}
										</td>
										<td>
                                            <a href="#" class="btn btn-warning btn-sm" title="修改"  data-toggle="modal" data-target="#myModal"> <i class="fa fa-edit (alias)" onclick="showss({%$value.grade_id%})"></i> </a>
                                            <a href="index.php?a=informstyle.noticesetdel&audit_type=grade&type_id={%$value.grade_id%}" class="btn btn-danger btn-sm" onclick="if(confirm('警告！确认清空信息?')==false)return false;" title="清空"> <i class="fa fa-trash-o"></i></a>
                                        </td>
                                    </tr>
									{%/foreach%}
                                    <tr>
									    <td style="font-weight:bold;">班主任</td>
                                        <td></td>
										<td></td>
                                    </tr>
                                    {%foreach from=$grades_lists key=key item=value%}
                                    <tr>
									    <td>{%$value.grade_name%}班主任</td>
                                        <td>
										{%foreach from=$value.staff_name key=k item=v%}
										    {%$v%}
										{%/foreach%}
										</td>
										<td>
                                            <a href="#" class="btn btn-warning btn-sm" title="修改"  data-toggle="modal" data-target="#myModal" onclick="showsss({%$value.grade_id%})"> <i class="fa fa-edit (alias)"></i> </a>
                                            <a href="index.php?a=informstyle.noticesetdel&audit_type=grades&type_id={%$value.grade_id%}" class="btn btn-danger btn-sm" onclick="if(confirm('警告！确认清空信息?')==false)return false;" title="清空"> <i class="fa fa-trash-o"></i></a>
                                        </td>
									  </tr>
									  {%/foreach%}
                       </table>   
				   </div><!--box-body -->
               </form>
           </div><!--box box-default box-solid-->
        </section>              
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
</div>
<!-- ./wrapper -->
<!--弹出框-->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
     <form name="myform1" action="" method="post">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">审批人选择</h4>
          </div>
          <div class="modal-body">
				  {%foreach from=$appoint_lists key=key item=value%}
					<label class="choice"><input type="checkbox" name="staff_id[]" value="{%$value.staff_id%}">{%$value.staff_name%}</label>
                  {%/foreach%}
          </div>
          <div class="modal-footer">
			
		    <input type="hidden" name="department_id" value="" id ="aaa">
			<input type="hidden" name="audit_type" value="" id ="bbb">
			<input type="hidden" name="grade_id" value="" id ="ccc">
			<input type="hidden" name="grades_id" value="" id ="ddd">
            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            <button type="submit" class="btn btn-primary">确定</button>
          </div>
      </form>
    </div>
  </div>
</div>
<!--弹出框-->
<script>

function show(a){

	$("#aaa").val(a);
	}
function shows(b){

	$("#bbb").val(b);
	}
function showss(c){

	$("#ccc").val(c);
	}
function showsss(d){

	$("#ddd").val(d);
	}
</script>





